<?php

class Default_Model_Register extends Zend_Db_Table_Abstract
{
	protected $_name = "ifunsoft_masterkey_reg";
	protected $_primary = "id";
	protected $db;
	var $id, $name, $email, $phone, $model, $userID, $payment, $time, $note, $status = 1;

	public function __construct(){
		$this->db = Zend_Registry::get('db');
	}
	
	public function insertUserRegister(){
		try {
			date_default_timezone_set("Asia/Saigon");
			$data = array(
					"name" => $this->name,
					"email" => $this->email,
					"phone" => $this->phone,
					"userID" => $this->userID,
					"model" => $this->model,
					"date" => date('Y-m-d'),
					"payment" => $this->payment,
					"note" => $this->note,
					"status"=> $this->status
			);
			//var_dump($data);die;
			$this->db->insert($this->_name, $data);
			return true;
		} catch (Exception $e) {
			return false;
		}
		
	}
}

